/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef __CHAR_SECTIONS_DBC_H__
#define __CHAR_SECTIONS_DBC_H__

#include "WOWDbcFile.h"

namespace PQGameCore
{
	class ChrSecsDbc
	{
	public:
		static const std::string PATH;
	protected:
		ChrSecsDbc();
	public:
		static ChrSecsDbc& getSingleton();
		inline char* getTex1Path(CharSectionRecord* record)
		{
			if(!_dbc){
				return 0;
			}
			return _dbc->getStringField(record->texture1);
		}

		inline char* getTex2Path(CharSectionRecord* record)
		{
			if(!_dbc){
				return 0;
			}
			return _dbc->getStringField(record->texture2);
		}

		CharSectionRecord *getRecord(Ogre::uint race, Ogre::uint gender, Ogre::uint type,Ogre::uint section, Ogre::uint color);
		int getRecordCount(Ogre::uint race, Ogre::uint gender, Ogre::uint type, Ogre::uint color, Ogre::uint npc);
	private:
		WOWDbcFile* _dbc;
	};

}

#define GNgChrSecsDbc PQGameCore::ChrSecsDbc::getSingleton()

#endif
